package com.lovo.invoicing.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.invoicing.bean.LogBean;
import com.lovo.invoicing.bean.PageBean;
import com.lovo.invoicing.service.ILogService;
import com.lovo.invoicing.utils.RUtils;
import com.lovo.invoicing.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    ILogService logService;

    @RequestMapping("/findLogsByPage")
    public ResponseResult<LogBean> findLogsByPage(@RequestBody PageBean pageBean){
        IPage<LogBean> log = logService.queryLogsByPage(pageBean);
        return RUtils.success(log);
    }
}
